import React from "react"
// 类组件
interface propType {//类组件属性接口
    foo:string
}
interface stateType {//类组件state接口
    hobby:Array<string>
    age:number
    sex:string
}
//类的声明,第一个是props,第二个是state
class Product extends React.Component<propType, stateType> {
    name:string
    constructor(props: any) {
        super(props);
        this.name="李雷",
        this.state = {
           hobby:["抽烟","喝酒","烫头"],
           age:20,
           sex:"boy"
        };
    }
    render(): React.ReactNode {
        return(
            <fieldset>
                <legend>Product</legend>
                <h1>Product</h1>
            </fieldset>
        )
    }
}
export default Product